/**
 * 文件名：ErpSkuDetail.java
 *
 * 创建人：Elvin Zhao - 279152260@qq.com
 *
 * 创建时间：2019年9月27日 下午5:17:39
 *
 * 版权所有：FNII
 */
package com.z100h.supplychain.order.entity;

import org.apache.commons.lang3.StringUtils;

/**
 * [描述信息：说明类的基本功能]
 *
 * @author Elvin Zhao - 279152260@qq.com
 * @version 1.0 Created on 2019年9月27日 下午5:17:39
 */
public class ErpSkuDetail {

	private String productPlantName;

	private String specPlantName;

	private String productFlowerpotName;

	private String specFlowerpotName;

	private String specFlowerpotColorName;

	private String specPlantingMethodName;

	private String stockroomName;

	private String stockroomId;

	private String serviceId;

	private String serviceType;

	private String summaryId;

	private String specPlantId;

	private String specFlowerpotId;

	private String specFlowerpotColorId;

	private String specPlantingMethodId;

	private Integer orderAmount;// SUMMARYID对应数量

	private String specId;

	private String colorId;

	private Integer amount;

	private String skuId;

	private String imageUrl;

	private String specName;

	private String skuName;

	private Integer skuAmount;

	private String scExt;

	private String evidenceId;

	/**
	 *
	 * @return 
	 */
	public String getStockroomName() {
		return stockroomName;
	}

	/**
	 *
	 * @param stockroomName
	 */
	public void setStockroomName(String stockroomName) {
		this.stockroomName = stockroomName;
	}

	/**
	 *
	 * @return 
	 */
	public String getProductPlantName() {
		return productPlantName;
	}

	/**
	 *
	 * @param productPlantName
	 */
	public void setProductPlantName(String productPlantName) {
		this.productPlantName = productPlantName;
	}

	/**
	 *
	 * @return 
	 */
	public String getSpecPlantName() {
		return specPlantName;
	}

	/**
	 *
	 * @param specPlantName
	 */
	public void setSpecPlantName(String specPlantName) {
		this.specPlantName = specPlantName;
	}

	/**
	 *
	 * @return 
	 */
	public String getProductFlowerpotName() {
		return productFlowerpotName;
	}

	/**
	 *
	 * @param productFlowerpotName
	 */
	public void setProductFlowerpotName(String productFlowerpotName) {
		this.productFlowerpotName = productFlowerpotName;
	}

	/**
	 *
	 * @return 
	 */
	public String getSpecFlowerpotName() {
		return specFlowerpotName;
	}

	/**
	 *
	 * @param specFlowerpotName
	 */
	public void setSpecFlowerpotName(String specFlowerpotName) {
		this.specFlowerpotName = specFlowerpotName;
	}

	/**
	 *
	 * @return 
	 */
	public String getSpecFlowerpotColorName() {
		return specFlowerpotColorName;
	}

	/**
	 *
	 * @param specFlowerpotColorName
	 */
	public void setSpecFlowerpotColorName(String specFlowerpotColorName) {
		this.specFlowerpotColorName = specFlowerpotColorName;
	}

	/**
	 *
	 * @return 
	 */
	public String getSpecPlantingMethodName() {
		return specPlantingMethodName;
	}

	/**
	 *
	 * @param specPlantingMethodName
	 */
	public void setSpecPlantingMethodName(String specPlantingMethodName) {
		this.specPlantingMethodName = specPlantingMethodName;
	}

	/**
	 *
	 * @return 
	 */
	public String getStockroomId() {
		return stockroomId;
	}

	/**
	 *
	 * @param stockroomId
	 */
	public void setStockroomId(String stockroomId) {
		this.stockroomId = stockroomId;
	}

	/**
	 *
	 * @return 
	 */
	public String getServiceId() {
		return serviceId;
	}

	/**
	 *
	 * @param serviceId
	 */
	public void setServiceId(String serviceId) {
		this.serviceId = serviceId;
	}

	/**
	 *
	 * @return 
	 */
	public String getServiceType() {
		return serviceType;
	}

	/**
	 *
	 * @param serviceType
	 */
	public void setServiceType(String serviceType) {
		this.serviceType = serviceType;
	}

	/**
	 *
	 * @return 
	 */
	public String getSummaryId() {
		return summaryId;
	}

	/**
	 *
	 * @param summaryId
	 */
	public void setSummaryId(String summaryId) {
		this.summaryId = summaryId;
	}

	/**
	 *
	 * @return 
	 */
	public String getSpecPlantId() {
		return specPlantId;
	}

	/**
	 *
	 * @param specPlantId
	 */
	public void setSpecPlantId(String specPlantId) {
		this.specPlantId = specPlantId;
	}

	/**
	 *
	 * @return 
	 */
	public String getSpecFlowerpotId() {
		return specFlowerpotId;
	}

	/**
	 *
	 * @param specFlowerpotId
	 */
	public void setSpecFlowerpotId(String specFlowerpotId) {
		this.specFlowerpotId = specFlowerpotId;
	}

	/**
	 *
	 * @return 
	 */
	public String getSpecFlowerpotColorId() {
		return specFlowerpotColorId;
	}

	/**
	 *
	 * @param specFlowerpotColorId
	 */
	public void setSpecFlowerpotColorId(String specFlowerpotColorId) {
		this.specFlowerpotColorId = specFlowerpotColorId;
	}

	/**
	 *
	 * @return 
	 */
	public String getSpecPlantingMethodId() {
		return specPlantingMethodId;
	}

	/**
	 *
	 * @param specPlantingMethodId
	 */
	public void setSpecPlantingMethodId(String specPlantingMethodId) {
		this.specPlantingMethodId = specPlantingMethodId;
	}

	/**
	 *
	 * @return 
	 */
	public Integer getOrderAmount() {
		return orderAmount;
	}

	/**
	 *
	 * @param orderAmount
	 */
	public void setOrderAmount(Integer orderAmount) {
		this.orderAmount = orderAmount;
	}

	/**
	 *
	 * @return 
	 */
	public String getSpecId() {
		return specId;
	}

	/**
	 *
	 * @param specId
	 */
	public void setSpecId(String specId) {
		this.specId = specId;
	}

	/**
	 *
	 * @return 
	 */
	public String getColorId() {
		return colorId;
	}

	/**
	 *
	 * @param colorId
	 */
	public void setColorId(String colorId) {
		this.colorId = colorId;
	}

	/**
	 *
	 * @return 
	 */
	public Integer getAmount() {
		return amount;
	}

	/**
	 *
	 * @param amount
	 */
	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	/**
	 *
	 * @return 
	 */
	public String getSkuId() {
		return skuId;
	}

	/**
	 *
	 * @param skuId
	 */
	public void setSkuId(String skuId) {
		this.skuId = skuId;
	}

	/**
	 *
	 * @return 
	 */
	public String getScExt() {
		return scExt;
	}

	/**
	 *
	 * @param scExt
	 */
	public void setScExt(String scExt) {
		this.scExt = scExt;
	}

	/**
	 * ERP成品规格唯一性KEY
	 * 
	 * @return
	 * @author: Elvin Zhao - 279152260@qq.com 
	 * @date: Created on 2019年9月29日 上午9:34:14
	 */
	public String getProductSpecGroupKey() {
		String str = specPlantId + "|" + specFlowerpotId + "|" + specFlowerpotColorId + "|" + specPlantingMethodId;

		if (StringUtils.isNotBlank(scExt)) {
			str += "|" + scExt;
		}
		return str;
	}

	/**
	 * 业务类型+业务id+summaryId
	 * 
	 * @return
	 * @author: Elvin Zhao - 279152260@qq.com 
	 * @date: Created on 2019年9月28日 下午2:13:17
	 */
	public String getServiceTypeIdSummaryIdGroupKey() {
		return serviceType + "|" + serviceId + "|" + summaryId;
	}

	public ErpSpecSku getErpSpecSku() {
		return new ErpSpecSku(specPlantId, specFlowerpotId, specFlowerpotColorId, specPlantingMethodId, specId,
				specFlowerpotColorId, amount, skuId, imageUrl, specName, skuName, skuAmount);
	}

	/**
	 * 
	 */
	public ErpSkuDetail() {
	}

	public String getFullName() {

		String fullName = "";

		if (StringUtils.equals(this.specFlowerpotId, "###")) {
			fullName = this.productPlantName + "-" + this.specPlantName;
		} else {
			fullName = this.productPlantName + "-" + this.specPlantName + "-" + this.productFlowerpotName + "-"
					+ this.specFlowerpotName + "-" + this.specFlowerpotColorName + "-" + this.specPlantingMethodName;
		}
		if (StringUtils.isNotBlank(scExt)) {
			fullName += "(" + scExt + ")";
		}
		return fullName;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	public String getEvidenceId() {
		return evidenceId;
	}

	public void setEvidenceId(String evidenceId) {
		this.evidenceId = evidenceId;
	}

	/**
	 *
	 * @return 
	 */
	public String getSkuName() {
		return skuName;
	}

	/**
	 *
	 * @param skuName
	 */
	public void setSkuName(String skuName) {
		this.skuName = skuName;
	}

}
